package com.whmskj.xjlhbc.vo;

import cn.hutool.core.date.BetweenFormatter;
import cn.hutool.core.date.DateUtil;
import com.whmskj.xjlhbc.domain.RundataInfo;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class RealInfoVo {

    private ClassInfo classInfo = new ClassInfo();

    private RundataInfo rundataInfo = new RundataInfo();

    private StopInfo stopInfo = new StopInfo();

    private List<StopInfo> stopInfoList = new ArrayList<>();

    @Data
    public static class ClassInfo{

        private String classes;

        private String team;

        private String employee;

        private String gender;

        private Long workNumber;

        private String positions;

        private String worktime;
    }

    @Data
    public static class StopInfo{

        private String type;

        private int total;

        private long stoptime;

        public String getStoptime() {
            return DateUtil.formatBetween(stoptime*1000, BetweenFormatter.Level.SECOND);
        }
    }
}
